<template>
  <div class="logo-container">
    <div class="logo">
      <img src="@/assets/logo.svg" alt="小采灵犀" class="logo-image" v-if="hasLogo" />
      <div class="logo-text" v-else>
        <span class="logo-text-primary">小采</span>
        <span class="logo-text-secondary">灵犀</span>
      </div>
    </div>
    <div class="system-name" v-if="!isCollapsed">
      小采灵犀智能对账系统
    </div>
  </div>
</template>

<script setup lang="ts">
import { computed } from 'vue'
import { useAppStore } from '@/stores/appStore'

const appStore = useAppStore()

const isCollapsed = computed(() => appStore.isSidebarCollapsed)
const hasLogo = computed(() => false) // 暂时没有logo图片，使用文字logo

// 如果需要添加logo图片，可以在assets目录下添加logo.png文件
</script>

<style scoped>
.logo-container {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  color: white;
  font-weight: bold;
  font-size: 16px;
}

.logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.logo-text-primary {
  font-size: 12px;
  font-weight: 600;
}

.logo-text-secondary {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.9;
}

.system-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 767px) {
  .system-name {
    display: none;
  }
}
</style>